import request from "@/utils/request";


/**
 * 获取部门信息
 * @returns {*}
 */
export const getAllDeptAPI = () => {
    return request({
        url: "/systemManager/dept/getDeptList"
    })
}

/**
 * 查询所有需要排班的用户数据
 * @returns {*}
 */
export function selectNeedSchedulingUsers() {
	return request({
		url: '/system/user/getAllSchedulingList'
	})
}

// 分页查询
export function listDeptForPage(data) {
    return request({
        url: '/systemManager/dept/list',
        method: 'post',
        data
    })
}
export function addDept(data) {
    return request({
        url: '/systemManager/dept/addDept',
        method: 'post',
        params: data
    })
}
export function updateDept(data) {
    return request({
        url: '/systemManager/dept/updateDept',
        method: 'post',
        data
    })
}
// 查询一个
export function getDeptById(id) {
    return request({
        url: `/systemManager/dept/getDeptByDeptId/${id}`,
        method: 'post'
    })
}
// 删除
export function deleteDeptByIds(ids) {
    return request({
        url: `/systemManager/dept/deleteDeptByDeptIds/${ids}`,
        method: 'delete'
    })
}